class Soluton {
    public ListNode FindKthToTail(ListNode head,int k) {
        //快慢指针
        if(head==null || k<=0) {
            return null;
        }
        ListNode slow=head;
        ListNode fast=head;
        while(k!=0) {
            if(fast!=null) {
                fast=fast.next;
            } else {
                return null;
            }
            k--;
        }
        while(fast!=null) {
            slow=slow.next;
            fast=fast.next;
        }
        return slow;
    }
}
public class newcoder1 {
}
